#pragma once
#include <wx/ctb/serport.h>
#include "../instrument.h"

#include "EmoStateDLL.h"
#include "edk.h"
#include "edkErrorCode.h"
#include "../Gangia_GUI.h"
#include "ConfigEmoDiag.h"


class MyEmotiv :	public Instrument
{
	
public:
	MyEmotiv(void);
	void *Entry(void);
	void StartDevice(wxString FileName,wxString FilePath,bool File);
	void StopDevice(void);
	int OpenPort(const char *PortCom, const char *OpenVal2, const char *OpenVal3);
	void Configure (void);
public:
	~MyEmotiv(void);

	EE_DataChannel_t targetChannelList[22];
	EmoEngineEventHandle eEvent;
	EmoStateHandle eState;
	unsigned int userID;
	unsigned short composerPort;
	float secs;
	unsigned int datarate;
	bool readytocollect;
	int option;
	int state;
	
	DataHandle hData;
	int MyChannel[16];
	int numCh;
private:
	void ChannelsInit(int numCh);
	ConfigEmoDiag *ConfigDiag;
	bool configured;
};

